<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
         
<h:head>

	<title>
		<ui:insert name="pageTitle">Mat å Annat AB</ui:insert>
	</title>
	<style type="text/css">
  		@import url("stylesheet.css");
	</style>
</h:head>

<h:body>
	<div id="content">
	
	<div id="banner"></div>
	
		<div id="top">			
			<div id="menu">
				<div class="topmenu">
   					<ui:insert name="header">
    					<f:view>
  							<h:form>
  								<ul>
  									<li><h:commandLink action="${navigatorBean.setPage('products')}" value="Produkter">
										<f:ajax render="mainContent subMenu"/>
									</h:commandLink></li>
									<li><h:commandLink action="${navigatorBean.setPage('kundkorg')}" value="Kundkorg">
										<f:ajax render="mainContent subMenu"/>
									</h:commandLink></li>
									
										<li><h:commandLink action="${navigatorBean.setPage('login')}" value="Login">
										<f:ajax render="mainContent subMenu"/>
									</h:commandLink></li>	
									
								
								</ul>
  							</h:form>
						</f:view>
    				</ui:insert>
				</div>
				
				<div id="menu2">
					<div class="submenu">
   						<ui:insert name="header2">
    						<f:view>
    							<h:panelGrid id="subMenu">
    								<h:panelGroup  id="subMenuForm" rendered="#{navigatorBean.submenuActive}">
  										<h:form>
  											<ul>
  											
												<li><h:commandLink action="${navigatorBean.setSubChoice('annat')}" value="Annat">
													<f:ajax render="mainContent"/>
												</h:commandLink></li>
												<li><h:commandLink action="${navigatorBean.setSubChoice('mat')}" value="Mat">
													<f:ajax render="mainContent"/>
												</h:commandLink></li>
												<li><h:commandLink action="${navigatorBean.setSubChoice('search')}" value="Sök produkt">
													<f:ajax render="mainContent"/>
												</h:commandLink></li>
											
											</ul>
  										</h:form>
  									</h:panelGroup>
  								</h:panelGrid>
							</f:view>
    					</ui:insert>
					</div>
				</div>
				
			</div>
		</div>

		<div id="main">
 			 <ui:insert name="mainInsert">
    			<f:view>
    				<h:panelGroup id="mainContent" rendered="true">
    					<ui:include src="#{navigatorBean.page}"/>
    					
    				</h:panelGroup>
    			</f:view> 
  			</ui:insert>
		</div>

		<div id="foot">
			<br />
			<ui:insert name="footerText">Senast uppdaterad 2013-03-05</ui:insert>
			<br />
		</div>


	</div>
</h:body>

</html>
